package com.robot.merchant.client;

import com.robot.merchant.client.impl.MemberClientImpl;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @author lin
 */
@Component
@FeignClient(value = "robot-member", fallback = MemberClientImpl.class)
public interface MemberClient {
    /**
     * 通过id查询会员
     *
     * @param id
     * @return
     */
    @GetMapping(value = "member/third/findMemberById/{id}", produces = "application/json; charset=utf-8")
    public String thirdFindMemberById(@PathVariable String id);


    /**
     * 根据storeId查店铺下所有评价并分页
     *
     * @param storeId
     * @param page
     * @param size
     * @return
     */
    @GetMapping(value = "evaluate/third/findEvaluatesByStoreId/{storeId}/{page}/{size}", produces = "application/json; charset=utf-8")
    public String thirdFindEvaluatesByStoreId(@PathVariable String storeId, @PathVariable int page, @PathVariable int size);
}
